

<script type="text/javascript" src="lib/hexmd5.js"></script>
<script type="text/javascript">
    function hashPassLogin(a){
        document.forms.login.pass.value = hex_md5(a);
    }
</script>
<h3>User Information</h3>
<%
            String user = (String) session.getAttribute("user");
            System.out.println(user);
            if (user != null) {
%>
<font size="4">
    Hello <font color="red"><%=user%></font><br/>
</font>
<form action="Logout">
    <input type="submit" value="LogOut"/>
</form>
<%
            } else {
%>

<%
                String username = request.getParameter("username");
                username = (username == null) ? "" : username;
                String errorLog = (String) request.getAttribute("errorLog");
                errorLog = (errorLog == null) ? "" : errorLog;
                System.out.println(errorLog);
%>
<form name="login" method="post" action="LoginControl">
    <table cellspacing="5">
        <tr>
            <td></td>
            <td><font color="red"> <%=errorLog%> </font></td>
        </tr>
        <tr>
            <td>Username:</td>
            <td><input name="username" type="text" value="<%=username%>"/></td>
        </tr>
        <tr>
            <td>Password:</td>
            <td>
                <input name="pass1" type="password" onchange="hashPassLogin(this.value)"/>
                <input type="hidden" name="pass">
            </td>
        </tr>
        <tr>
            <td></td>
            <td><input type="submit" value="Login"/></td>
        </tr>
    </table>
    <br/>
    Not a user. <a href="register.jsp">Register here!</a>
</form>
<%            }
%>

<div id="promo1" class="promo rounded-5px-all">
    <h2><a href="#">Trust from Search to Browse to Buy</a></h2>
    <p>Boost your site traffic and conversions with powerful trust features. Free with every SSL Certificate.</p>
    <p class="promo-image"><a href="#"><img src="images/shoppingcart.png" alt="VeriSign Trusted" height="84"></a></p>
    <p><a href="#" class="promo-arrow-right">Learn more</a></p>
</div>

<div id="promo2" class="promo rounded-5px-all">
    <h2><a href="#">Protect Your Site.<br>Grow Your Business.</a></h2>
    <p>New features from VeriSign SSL make your Web site <b>easy to trust</b> and <b>easy to secure</b>.</p>
    <p class="promo-image"><a href="#"><img src="images/va-hp-promo.png" alt="Protect Your Site. Grow Your Business."></a></p>
    <p><a href="#" class="promo-arrow-right">Learn more</a></p>
</div>

<br />
